package com.wing.purchase.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.purchase.model.entity.PurchasePlan;
import com.wing.purchase.model.entity.PurchasePlanDetail;
import com.wing.purchase.model.entity.PurchaseRequisitions;
import com.wing.purchase.model.request.PurchaseRequisitionsForm;
import com.wing.purchase.model.response.PurchaseRequisitionsVO;

import java.util.List;
import java.util.Map;

/**
 * 采购请购单-Service
 *
 * @author
 */
public interface PurchaseRequisitionsService extends IService<PurchaseRequisitions> {

    /**
     * 添加
     *
     * @param purchaseRequisitionsForm
     * @return
     */
    int add(PurchaseRequisitionsForm purchaseRequisitionsForm);

    /**
     * 修改
     *
     * @param purchaseRequisitions
     * @return
     */
    int update(PurchaseRequisitions purchaseRequisitions);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<PurchaseRequisitionsVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<PurchaseRequisitionsVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    PurchaseRequisitionsVO get4appById(Long id);

    /**
     * 删除
     * @param purchaseRequisitionsId
     * @return
     */
    boolean delete(Long purchaseRequisitionsId);

    /**
     * 确认采购请购单
     * @param id
     * @return
     */
    int confirm(Integer id);

    /**
     * 审核采购请购单
     * @param purchaseRequisitions
     * @return
     */
    int audit(PurchaseRequisitions purchaseRequisitions);

    /**
     * 关闭
     * @param id
     * @return
     */
    int close(Integer id);

    /**
     * 询价结束
     * @param id
     * @return
     */
    int finish(Integer id);
}
